﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpShare.Configuration;
using Microsoft.ManagementConsole;
using SharpShare.Activation;
using System.ComponentModel;

namespace SharpShare.Management.Mmc.Nodes {
    public class StorageProviderNode : ExtensionNode<StorageProviderElement> {
        public StorageProviderNode(IExtensionFactory<StorageProviderElement> factory, ExtensionDescriptor<StorageProviderElement> descriptor)
            : base(factory, descriptor) {

            this.ViewDescriptions[0].DisplayName = "Storage Provider Information";
            this.ViewDescriptions[1].DisplayName = "Storage Providers";
        }

        protected override ExtensionInstanceNode<StorageProviderElement> CreateInstanceNode(StorageProviderElement extension) {
            return new StorageProviderInstanceNode(extension, this.Factory) {
                ImageIndex = (int)Icon.StorageGold,
                SelectedImageIndex = (int)Icon.StorageGold,
                InstanceSelector = this.InstanceSelector,
                Tag = extension
            };
        }

     
    }
}
